


google.load('search', '1.0');

function OnLoad() {
    
    // Create a search control
    var searchControl = new google.search.SearchControl();
    
    // Add in a full set of searchers
    var localSearch = new google.search.LocalSearch();
    // create a searcher options object
    // set up for open expansion mode
    // load a searcher with these options
    
    
    var options = new google.search.SearcherOptions();      
    options.setExpandMode(google.search.SearchControl.EXPAND_MODE_PARTIAL);
    options.setRoot(document.getElementById("searchResults"));
    //searchControl.addSearcher(localSearch);
    searchControl.addSearcher(new google.search.WebSearch(),options);
    //searchControl.addSearcher(new google.search.VideoSearch(),options);
    searchControl.addSearcher(new google.search.BlogSearch(),options);
    //searchControl.addSearcher(new google.search.NewsSearch(),options);
    //searchControl.addSearcher(new google.search.ImageSearch(),options);
    //searchControl.addSearcher(new google.search.BookSearch(),options);
    //searchControl.addSearcher(new google.search.PatentSearch(),options);
    
    // create a drawOptions object
    var drawOptions = new google.search.DrawOptions();
    
    // tell the searcher to draw itself in linear mode
    drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_LINEAR);
    // Set the Local Search center point
    //localSearch.setCenterPoint("New York, NY");
    
    // tell the searcher to draw itself and tell it where to attach
    searchControl.draw(document.getElementById("searchcontrol"));
    
    // execute an inital search
    //searchControl.execute("VW GTI");
}
google.setOnLoadCallback(OnLoad);
